package com.wise.entities.content;

import com.wise.framework.basic.DateTimeUtil;
import com.wise.framework.daoannotations.Column;
import com.wise.framework.daoannotations.Table;
import com.wise.framework.entitiesbasic.IdTimeEntity;
import com.wise.framework.session.CurrentUserId;
import lombok.Getter;
import lombok.Setter;

/**
 * 搜索推荐实体类
 *
 * @author Haoming Chen
 * Created on 2019/11/14
 */
@Getter
@Setter
@Table("market_search_advice")
public class SearchAdvice extends IdTimeEntity {

    /**
     * keyword - 搜索关键字
     */
    @Column("keyword")
    private String keyword;
    public static final String _keyword = "keyword";

    /**
     * uri - 搜索uri
     */
    @Column("uri")
    private String uri;
    public static final String _uri = "uri";

    /**
     * is_delete - 是否删除 1-删除 0-不删除
     */
    @Column("is_delete")
    private Boolean isDelete;
    public static final String _isDelete = "is_delete";

    /**
     * is_activate - 是否激活 1-激活 0-未激活
     */
    @Column("is_activate")
    private Boolean isActivate;
    public static final String _isActivate = "is_activate";

    /**
     * sort - 排序
     */
    @Column("sort")
    private Integer sort;
    public static final String _sort = "sort";

    public static SearchAdvice createSearchAdvice() {
        SearchAdvice searchAdvice = new SearchAdvice();
        searchAdvice.setIsDelete(false);
        searchAdvice.setSort(50);
        searchAdvice.setCreationDate(DateTimeUtil.timestampNow());
        searchAdvice.setCreatedBy(CurrentUserId.s(true));
        return searchAdvice;
    }

}
